package com.jp.juc.thread;

public class UseThread {


    private static class MyThread extends Thread {
        public MyThread(String name) {
            super(name);
        }

        @Override
        public void run() {
            System.out.println(Thread.currentThread().getName() + "==run==Thread");
        }
    }

    private static class MyRunnable implements Runnable {
        @Override
        public void run() {
            System.out.println(Thread.currentThread().getName() + "==run==Runnable");
        }
    }


    public static void main(String[] args) {
        new MyThread("a1").start();
        new Thread(new MyRunnable(), "a2").start();
    }
}
